//conrot_servo_test.cpp
//Erik Wright
/*
This file is made to test the inherited class conrot_servo.
*/

#include <iostream>
#include "conrot_servo.h"

using namespace std;

int main()
{
	cout<<"Beginning Test"<<endl;

	cout<<"Instantiating Classes"<<endl;
	conrot_servo* motor_a = new conrot_servo();	//make new class
	data_node* temp = new data_node(1500, 1000);		//2 cm test
	motor_a->insert_at_end(temp);
	temp = new data_node(1757, 1000);
	motor_a->insert_at_end(temp);
	temp = new data_node(1500, 1000);
	motor_a->insert_at_end(temp);
	temp = new data_node(1500, 1000);
	motor_a->insert_at_end(temp);

	cout<<"Motor A"<<endl;
	motor_a->display();

	float val = motor_a->disp_at_t(1);
	cout<<"T=1  :"<<val<<endl;
	
	val = motor_a->disp_at_t(2);
	cout<<"T=2  :"<<val<<endl;
	
	val = motor_a->disp_at_t(3);
	cout<<"T=3  :"<<val<<endl;


	motor_a->print_disp(.01, "motor_a_disp.csv");
	motor_a->print_velo(.01, "motor_a_velo.csv");
	
	cout<<"Killing Dynamic Memory"<<endl;
	delete temp;
	delete motor_a;

	cout<<"Program Done"<<endl;

	
	return 0;
	

}
